Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
Sass Error: Invalid CSS after "...lude animations": expected "}" | Sass dark theme implementation

Recently I want to use sass to implement a dark theme in my ts test project but IDK why I face this issue

Error in plugin "sass"
Message:
    src/Assets/Sass/main.scss
Error: Invalid CSS after "...lude animations": expected "}", was ".theme-change;"
        on line 6 of src/Assets/Sass/main.scss
>>     @include animations.theme-change;

   -------------^

in my main file main.scss i @use my partials and @include @mixin like this:

@use 'colors';
@use 'animations';
@use 'theme';

body {
    @include animations.theme-change;

    &[data-theme='light'] {
        @include theme.mode(colors.$light, colors.$dark);

        @include theme.components(colors.$light, colors.$dark);
    }

    &[data-theme='dark'] {
        @include theme.mode(colors.$dark, colors.$light);

        @include theme.components(colors.$dark, colors.$light);
    }
}

These are my partial
in side all of them there is one or two @mixin only
_animations.scss
_colors.scss
_theme.scss


_theme.scss includes theme styles and components

@mixin mode($theme-bg, $theme-color) {
    background: $theme-bg;
    color: $theme-color;
}

@mixin components($theme-bg, $theme-color) {
    .container {
        width: 100vw;
        height: auto;
    }
}

_colors.scss is just some variables holding theme colors

$light: #fff;
$dark: #232323;

$primary: #FFBD07;
$secondary: #2b2d42;
$tertiary: #edf2f4;
$quaternary: #e5383b;

_animations.scss have just a @mixin

@mixin theme-change {
    transition: color, background cubic-bezier(0.68, -0.55, 0.27, 01.55) 420ms !important;
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

.sass files are for stylus syntax, use .scss as the extension instead

SCSS example:

.container {
  background-color: #f5f5f5;
}

SASS example:

.container
  background-color: #f5f5f5

as you can see SASS doesnt use braces and semicolons

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda